<template>

  <button :class="[
            type ? 'el-button--' + type : '',
            size ? 'el-button--' + size : '',
          ]"
          class="el-button"
          @click="handleClick(1,$event)">
    <span v-if="$slots.default">
      <slot></slot>
    </span>
  </button>

</template>

<script>
import { mapActions } from 'vuex'
export default {
  name: 'ElButton',
  props: {
    type: {
      type: String,
      default: 'default'
    },
    size: {
      type: String,
      default: 'default'
    }
  },
  data () {
    return {

    }
  },
  computed: {

  },
  watch: {

  },
  created () {

  },
  mounted () {
    console.log(this.$parent)
  },
  methods: {
    handleClick (num, evt) {
      this.$store.dispatch('addAboutVue')
      console.log(num)
      console.log(evt)
    },
    ...mapActions(['addAboutVue'])
  }
}
</script>
